<div id='whole'>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <title>Unittest Results</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link href="/site_media/css/page.css" site_media="screen" rel="Stylesheet"
   type="text/css" />
   <link href="/site_media/css/test.css" site_media="screen" rel="Stylesheet" type="text/css" />
   
    <script type="text/javascript" src="/site_media/js/MochiKit/MochiKit.js"></script>
    <script type="text/javascript" src="/site_media/js/plotkit/excanvas.js"></script>
    <script type="text/javascript" src="/site_media/js/plotkit/Base.js"></script>
    <script type="text/javascript" src="/site_media/js/plotkit/Layout.js"></script>
    <script type="text/javascript" src="/site_media/js/plotkit/Canvas.js"></script>
    <script type="text/javascript" src="/site_media/js/plotkit/SweetCanvas.js"></script>
    <script type="text/javascript" src="/site_media/js/plotkit/EasyPlot.js"></script>
</head>


<body>

    <div id="body">
    <h1>Unittest Results</h1>
    
    <div style="margin: 0 auto 0 auto; width: 900px;">
    <p> Tests Over Time </p> 
    <div><canvas id="testvstime_chart" width="800" height="400"></canvas></div>
    <p> Coverage Over Time </p>
    <div><canvas id="coveragevstime_chart" width="800" height="400"></canvas></div>
    
    <br/>
    <table id="tests_vs_time" class="data">
        <thead>
            <tr><td>id</td><td>svnrev</td><td>#Test</td><td>Runnable</td><td>Passing</td><td>Stmts</td><td>Executed</td><td>Pct_Cov</td></tr>
        </thead>
        <tbody>r
            {% for result in utest_results %}
            <tr>
                {% for item in result %}
                <td>{{ item }}</td>
                {% endfor %}
            </tr>
            {% endfor %}    
        </tbody>
    </table>
    
    <script type="text/javascript">
        var hexColor = MochiKit.Color.Color.fromHexString;

        var colorScheme = [hexColor("#FF0000"),hexColor("#880000"),hexColor("#008800")];
        var chart_options = {
        "pieRadius": 0.4,
        "colorScheme": colorScheme,
        "padding": {left: 100, right: 20, top: 10, bottom: 30},
        "shouldStroke": false ,
        }
        var layout_options = {
        "xOriginIsZero": false,
        };

        var layout_tvt = new Layout("line", layout_options);
        layout_tvt.addDatasetFromTable("Tests", $("tests_vs_time"), xcol = 0, ycol = 2, lcol=1);        
        layout_tvt.addDatasetFromTable("Failures", $("tests_vs_time"), xcol = 0, ycol = 3, lcol=1);
        layout_tvt.addDatasetFromTable("Errors", $("tests_vs_time"), xcol = 0, ycol = 4), lcol=1;
        layout_tvt.evaluate();
        var testvstime_chart = new SweetCanvasRenderer($("testvstime_chart"), layout_tvt, chart_options);
        

        var colorScheme = [hexColor("#880000"),hexColor("#008800")];
        var chart_options = {
        "pieRadius": 0.4,
        "colorScheme": colorScheme,
        "padding": {left: 100, right: 20, top: 10, bottom: 30},
        "shouldStroke": false ,
        }
        var layout_options = {
        "xOriginIsZero": false,
        };
        var layout_cvt = new Layout("line", layout_options);
        // layout_cvt.addDataset("dummy", [[0,0]]);
        layout_cvt.addDatasetFromTable("Statements", $("tests_vs_time"), xcol = 0, ycol = 5, lcol=1);
        layout_cvt.addDatasetFromTable("Statements Executed", $("tests_vs_time"), xcol = 0, ycol = 6, lcol=1);
        layout_cvt.evaluate();
        
        var coveragevstime_chart = new SweetCanvasRenderer($("coveragevstime_chart"), layout_cvt, chart_options);

        testvstime_chart.render();
        coveragevstime_chart.render();

    </script>
    </div>
    
    <div class="footer"><a href="http://www.liquidx.net/plotkit/">PlotKit</a></div>    
</div>
</body></html>

</div>
